package com.company.huisuo.biz.dialog

import android.app.Activity
import android.view.LayoutInflater
import android.widget.TextView
import com.company.huisuo.R
import com.company.huisuo.base.BaseBlurDialog
import com.company.huisuo.biz.bean.ArtistBean
import com.company.huisuo.databinding.DialogArtistRewardDataBinding
import com.lxj.xpopup.core.BottomPopupView

/**
 * 打赏艺人数据Dialog
 */
class ArtistRewardDataDialog(
    activity: Activity, val bean: ArtistBean?, private val rewardClick: () -> Unit
) : BottomPopupView(activity) {

    override fun getImplLayoutId(): Int {
        return R.layout.dialog_artist_reward_data
    }

    override fun onCreate() {
        super.onCreate()
        findViewById<TextView>(R.id.tv_name).text = "${bean?.name} ${bean?.age}岁 ${bean?.job}"
        findViewById<TextView>(R.id.tv_desc).text = bean?.desc
        findViewById<TextView>(R.id.tv_button_right).setOnClickListener {
            rewardClick.invoke()
        }
    }
}